<?php
namespace app\backend\model;
use think\Model;
class User extends Model
{
  protected $table = 'think_users';
  protected $autoWriteTimestamp = true;
  protected $insert = ['status' => 1];

  public function permission()
  {
    // 用户HAS ONE档案关联
    return $this->hasOne('Permission', 'id', 'permission_id');
  }
}